﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Security;

namespace DefectTracker.Common
{
    public interface ISecurity
    {
        bool ChangePassword(string userName, string oldPassword, string newPassword);
        bool ChangePasswordQuestionAndAnswer(string userName, string password, string newPasswordQuestion, string newPasswordAnswer);
        CreateUserResponse CreateUser(string userName, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey);
        bool DeleteUser(string userName, bool deleteAllRelatedData);
        FindUserResponse FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize);
        FindUserResponse FindUsersByName(string userNameToMatch, int pageIndex, int pageSize);
        FindUserResponse GetAllUsers(int pageIndex, int pageSize);
        int GetNumberOfUsersOnline();
        string GetPassword(string userName, string answer);
        MembershipUser GetUser(object providerUserKey, bool userIsOnline);
        MembershipUser GetUser(string userName, bool userIsOnline);
        string GetUserNameByEmail(string email);
        string ResetPassword(string userName, string answer);
        bool UnlockUser(string userName);
        void UpdateUser(MembershipUser user);
        bool ValidateUser(string userName, string password);

        MembershipProviderSettings GetSettings();
    }
}
